//
//  Message.h
//  BetsAndBrains
//
//  Created by Augustine, Eric M (augus011) on 4/28/12.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface Message : NSObject {
	NSArray* data;
	NSInteger currentIndex;
	Boolean hasNext;
}

@property (retain) NSArray* data;
@property NSInteger currentIndex;
@property Boolean hasNext;

-(id) initWithByte:(Byte)code;
-(id) initWithPacket:(CFDataRef*)packet;
-(void)addInt:(NSInteger)value;
-(void)addString:(NSString*)value;
-(void)addByteArray:(NSArray*)value;
-(NSArray*)catByteArray:(NSArray*)first :(NSArray*)second;
-(NSInteger)getDataLength;
-(Byte)getMessageType;
-(NSString*)nextString;
-(NSInteger)nextInt;
-(void)finalizeMessage;

@end
